<?php

class Application_Form_File extends Zend_Form
{
	public function init(){
		$this->setName('car');
		$this->setMethod("post");
		$this->setEnctype("multipart/form-data");

			
		

		$image = new Zend_Form_Element_File('image');
		$image->setLabel('Upload Image:');
		$image->setDestination(APPLICATION_PATH .'/images/');
		$image->setRequired(true);
		//$image->setMultiFile(3);
		$image->addValidator('Count', false, 3);
		$image->addValidator('Size', false, 3145728);
		$image->addValidator('Extension', false, 'jpg,jpeg,png,gif');
		$image->setMultiFile(3);
		

		$submit = new Zend_Form_Element_Submit('submit');
		$submit->setAttrib('id', 'submitbutton')
		->setLabel('Add');

		$elements = array($image, $submit);
		$this->addElements($elements);

		$this->setDecorators( array( array('ViewScript', array('viewScript' => 'forms/loginform.phtml'))));
	}
}